import java.util.Scanner;

public class 性别结婚 {
    public static void main(String[] args) {
        Scanner reader = new Scanner(System.in);
        System.out.println("请输入小王的性别");
        String xiaowang = reader.next();
        System.out.println("请输入小张的性别");
        String xiaozhang = reader.next();
        if ((xiaowang.equals("男") && xiaozhang.equals("男")) || (xiaowang.equals("女") && xiaozhang.equals("女"))) {
            System.out.println("不能结婚");
        } else {
            System.out.println("可以结婚");
        }
    }
}


